/*
 * Copyright © 2004-2014 chenYuan. All rights reserved.
 * @Website:wwww.jspx.net
 * @Mail:39793751@qq.com
 * @author: chenYuan , 陈原
 * @License: Jspx.net Framework Code is open source (LGPL)，Jspx.net Framework 使用LGPL 开源授权协议发布。
 * @jvm:jdk1.6+  x86/amd64
 *
 */
package com.jspx.sioc.tag;

import com.jspx.sioc.Sioc;
import com.jspx.utils.StringUtil;
import com.jspx.utils.XMLUtil;
import org.xml.sax.SAXException;
import java.io.IOException;
import java.util.List;
import com.jspx.scriptmark.core.TagNode;
import com.jspx.scriptmark.parse.XmlEngineImpl;
import com.jspx.scriptmark.XmlEngine;

/**
 * Created by IntelliJ IDEA.
 * User:chenYuan (mail:39793751@qq.com)
 * Date: 2007-2-12
 * Time: 0:42:50
 * <p/>
 * <list name="XXXList" class="integer">
 * <value>2</value>
 * <value>2</value>
 * </list>
 */

public class ListElement extends IocTagNode
{
    public final static String tag_name = "list";
    public ListElement()
    {
        
    }

    public String getClassName() throws IOException, SAXException
    {
        return XMLUtil.deleteQuote(getAttribute(Sioc.IocClass));
    }

    public List<TagNode> getValueList() throws Exception
    {
        XmlEngine xmlEngine = new XmlEngineImpl();
        xmlEngine.putTag("value",ValueElement.class.getName());
        return xmlEngine.getTagNodes(getBody());
    }

}